home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Technology Seed / Jan. '98 ATS.toast / HFS Volume Format ƒ / DiskInit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-01  |  4.2 KB  |  160 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        DiskInit.h
  3.  
  4.      Contains:    Disk Initialization Package ('PACK' 2) Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    8.1a3c2
  8.  
  9.      Copyright:    © 1985-1997, 1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __DISKINIT__
  19. #define __DISKINIT__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47. struct HFSDefaults {
  48.     char                             sigWord[2];                    /* signature word */
  49.     long                             abSize;                        /* allocation block size in bytes */
  50.     long                             clpSize;                    /* clump size in bytes */
  51.     long                             nxFreeFN;                    /* next free file number */
  52.     long                             btClpSize;                    /* B-Tree clump size in bytes */
  53.     short                             rsrv1;                        /* reserved */
  54.     short                             rsrv2;                        /* reserved */
  55.     short                             rsrv3;                        /* reserved */
  56. };
  57. typedef struct HFSDefaults HFSDefaults;
  58.  
  59.  
  60. enum {
  61.     kHFSPlusDefaultsVersion        = 1
  62. };
  63.  
  64. struct HFSPlusDefaults {
  65.     UInt16                             version;                    /* version of this structure */
  66.     UInt16                             flags;                        /* currently undefined; pass zero */
  67.     UInt32                             blockSize;                    /* allocation block size in bytes */
  68.     UInt32                             rsrcClumpSize;                /* clump size for resource forks */
  69.     UInt32                             dataClumpSize;                /* clump size for data forks */
  70.     UInt32                             nextFreeFileID;                /* next free file number */
  71.     UInt32                             catalogClumpSize;            /* clump size for catalog B-tree */
  72.     UInt32                             catalogNodeSize;            /* node size for catalog B-tree */
  73.     UInt32                             extentsClumpSize;            /* clump size for extents B-tree */
  74.     UInt32                             extentsNodeSize;            /* node size for extents B-tree */
  75.     UInt32                             attributesClumpSize;        /* clump size for attributes B-tree */
  76.     UInt32                             attributesNodeSize;            /* node size for attributes B-tree */
  77. };
  78. typedef struct HFSPlusDefaults HFSPlusDefaults;
  79.  
  80.  
  81. EXTERN_API( void )
  82. DILoad                            (void)                                                        THREEWORDINLINE(0x7002, 0x3F00, 0xA9E9);
  83.  
  84. EXTERN_API( void )
  85. DIUnload                        (void)                                                        THREEWORDINLINE(0x7004, 0x3F00, 0xA9E9);
  86.  
  87. EXTERN_API( short )
  88. DIBadMount                        (Point                     where,
  89.                                  long                     evtMessage)                            THREEWORDINLINE(0x7000, 0x3F00, 0xA9E9);
  90.  
  91. EXTERN_API( OSErr )
  92. DIFormat                        (short                     drvNum)                                THREEWORDINLINE(0x7006, 0x3F00, 0xA9E9);
  93.  
  94. EXTERN_API( OSErr )
  95. DIVerify                        (short                     drvNum)                                THREEWORDINLINE(0x7008, 0x3F00, 0xA9E9);
  96.  
  97. EXTERN_API( OSErr )
  98. DIZero                            (short                     drvNum,
  99.                                  ConstStr255Param         volName)                            THREEWORDINLINE(0x700A, 0x3F00, 0xA9E9);
  100.  
  101. /*
  102.     DIXFormat, DIXZero, and DIReformat are only available when FSM (File System Manager) is installed.
  103.     FSM is part of Macintosh PC Exchange and System 7.5.
  104. */
  105. EXTERN_API( OSErr )
  106. DIXFormat                        (short                     drvNum,
  107.                                  Boolean                 fmtFlag,
  108.                                  unsigned long             fmtArg,
  109.                                  unsigned long *        actSize)                            THREEWORDINLINE(0x700C, 0x3F00, 0xA9E9);
  110.  
  111. EXTERN_API( OSErr )
  112. DIXZero                            (short                     drvNum,
  113.                                  ConstStr255Param         volName,
  114.                                  short                     fsid,
  115.                                  short                     mediaStatus,
  116.                                  short                     volTypeSelector,
  117.                                  unsigned long             volSize,
  118.                                  void *                    extendedInfoPtr)                    THREEWORDINLINE(0x700E, 0x3F00, 0xA9E9);
  119.  
  120. EXTERN_API( OSErr )
  121. DIReformat                        (short                     drvNum,
  122.                                  short                     fsid,
  123.                                  ConstStr255Param         volName,
  124.                                  ConstStr255Param         msgText)                            THREEWORDINLINE(0x7010, 0x3F00, 0xA9E9);
  125.  
  126.  
  127. #if CGLUESUPPORTED
  128. EXTERN_API_C( OSErr )
  129. dibadmount                        (Point *                where,
  130.                                  long                     evtMessage);
  131.  
  132. EXTERN_API_C( OSErr )
  133. dizero                            (short                     drvnum,
  134.                                  const char *            volName);
  135.  
  136. #endif  /* CGLUESUPPORTED */
  137.  
  138.  
  139.  
  140. #if PRAGMA_STRUCT_ALIGN
  141.     #pragma options align=reset
  142. #elif PRAGMA_STRUCT_PACKPUSH
  143.     #pragma pack(pop)
  144. #elif PRAGMA_STRUCT_PACK
  145.     #pragma pack()
  146. #endif
  147.  
  148. #ifdef PRAGMA_IMPORT_OFF
  149. #pragma import off
  150. #elif PRAGMA_IMPORT
  151. #pragma import reset
  152. #endif
  153.  
  154. #ifdef __cplusplus
  155. }
  156. #endif
  157.  
  158. #endif /* __DISKINIT__ */
  159.  
  160.